<template>
  <div class="buyingIfor platformStockInList1">
    <template v-for="(i,index) in dataList">
      <el-card shadow="hover" :key="index">
        <div>
          <template v-for="(item,index1) in btn">
            <el-button
              :key="index1"
              @click="handler(index1,index)"
              v-if="item.isShow"
              type="primary"
              style="margin:0 10px 0px 0"
              :size="item.size"
            >{{item.title}}</el-button>
          </template>
          <div class="total">
            <div>
              <span>共</span>
              <span>{{loadData.length}}</span>
              <span>种商品</span>
              <!-- <span>{{price}}</span> -->
            </div>
            <!-- <div>
              <el-input placeholder="商品名称或条码" style="width:250px">
                <el-button slot="append" icon="el-icon-search"></el-button>
              </el-input>
            </div> -->
          </div>
          <avue-crud
            ref="index"
            style="width:100%"
            :data="loadData"
            :option="tableOption"
            :table-loading="loading"
            @selection-change="selectionChange"
          >
            <template
              slot="stayInNum"
              slot-scope="scope"
            >{{ parseFloat(scope.row.inNum ? scope.row.inNum : 0) - parseFloat(scope.row.confirmInNum ? scope.row.confirmInNum : 0)}}</template>
            <template slot="goodsName" slot-scope="scope">
              <el-button type="text" @click="del(scope.row)">{{scope.row.goodsName}}</el-button>
            </template>
          </avue-crud>
        </div>
      </el-card>
    </template>
  </div>
</template>

<script src='./buyingIfor.js'></script>

<style lang="scss">
.platformStockInList1 {
  .title {
    padding: 0 0 20px 0;
    font-weight: 500;
    font-size: 24px;
  }
  .total {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    span:nth-child(even) {
      font-weight: 600;
      font-size: 18px;
    }
    span:nth-child(odd) {
      font-size: 14px;
    }
  }
}
</style>